package com.example.mybatis_test.service.impl;

import com.example.mybatis_test.entity.stu.Stu;
import com.example.mybatis_test.entity.stu.vo.OneToOneVo;
import com.example.mybatis_test.mapper.StuMapper;
import com.example.mybatis_test.service.StuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mybatis_test.util.R;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ican
 * @since 2023-06-08
 */
@Service
public class StuServiceImpl extends ServiceImpl<StuMapper, Stu> implements StuService {

    @Resource
    private StuMapper stuMapper;

    @Override
    public R selectOneToOne() {
        List<OneToOneVo> list = stuMapper.selectOneToOne();
        return R.ok("查询成功").put("list",list);
    }
}
